﻿using System.Collections;
using System.Collections.Generic;
using SWS;
using UnityEngine;

public class PathFiveController : MonoBehaviour
{

    public BezierPathManager BezierPath;

    public Transform ImgPrefab;
    public Transform ImgParent;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
	    if (Input.GetKeyDown(KeyCode.P))
	    {
            InsertPrefab();
	    }
	}

    public void InsertPrefab()
    {
        splineMove SM = Instantiate(ImgPrefab, ImgParent).GetComponent<splineMove>();
        SM.SetPath(BezierPath);
        
    }
}
